//
//  YGDRCodeTableViewCell.m
//  yuanshangyiliao
//
//  Created by icholab on 2021/3/17.
//

#import "YGDRCodeTableViewCell.h"


@interface YGDRCodeTableViewCell()

@property (nonatomic, strong) UITextField *urCodeField;



@end

@implementation YGDRCodeTableViewCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self initView];
        [self initContraints];
    }
    return self;
}

- (void)initView{

    [self addContentView:self.realNameField];
   
}


- (void)initContraints{
    [self.urCodeField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.height.mas_equalTo(self.contentSuperView.mas_height);
        make.width.mas_equalTo(200);
        make.height.mas_equalTo(self.contentSuperView.mas_height);
    }];
    
}


- (UITextField *)realNameField{
    if (!_urCodeField) {
        _urCodeField =[[UITextField alloc] init];
        _urCodeField.font= [UIFont systemFontOfSize:14];
        _urCodeField.layer.borderWidth=0;
        _urCodeField.placeholder=@"请输入推荐码";
        _urCodeField.textAlignment= NSTextAlignmentLeft;
        _urCodeField.delegate=self;
        [_urCodeField addTarget:self action:@selector(textFieldDidChange:) forControlEvents:UIControlEventEditingChanged];
        
        
    }
    return _urCodeField;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
